
INSERT INTO INVENTORY_BALANCE
(
    ID
  , REGION_CODE
  , WAREHOUSE_CODE
  , STOCK_ITEM_NUMBER
  , ON_HAND_QUANTITY
  , MORTGAGED_QUANTITY
  , UNSALABLE_QUANTITY
  , SAFE_QUANTITY
  , STATUS_
  , PRE_TNA_STATUS
  , PRE_SALE_STATUS
  , UNTIL_DATE_TIME
  , POST_TNA_STATUS
  , POST_SALE_STATUS
  , TRANSFER_STATUS
  , CREATED_TIMESTAMP
  , MODIFIED_TIMESTAMP
)
select
    INVENTORY_BALANCE_ID_SEQ.nextval      ID                     
  , '360'                        REGION_CODE            
  , 'UTC1'                       WAREHOUSE_CODE         
  , 12345                        STOCK_ITEM_NUMBER      
  , 100                         ON_HAND_QUANTITY       
  , 5                           MORTGAGED_QUANTITY     
  , 0                           UNSALABLE_QUANTITY     
  , 5                           SAFE_QUANTITY          
  , 1                           STATUS                 
  , NULL                        PRE_TNA_STATUS         
  , NULL                        PRE_SALE_STATUS        
  , NULL                        UNTIL_DATE_TIME        
  , NULL                        POST_TNA_STATUS        
  , NULL                        POST_SALE_STATUS       
  , NULL                        TRANSFER_STATUS        
  , current_timestamp           CREATED_TIMESTAMP      
  , current_timestamp           MODIFIED_TIMESTAMP     
from dual;




INSERT INTO INVENTORY_BALANCE
(
    ID
  , REGION_CODE
  , WAREHOUSE_CODE
  , STOCK_ITEM_NUMBER
  , ON_HAND_QUANTITY
  , MORTGAGED_QUANTITY
  , UNSALABLE_QUANTITY
  , SAFE_QUANTITY
  , STATUS_
  , PRE_TNA_STATUS
  , PRE_SALE_STATUS
  , UNTIL_DATE_TIME
  , POST_TNA_STATUS
  , POST_SALE_STATUS
  , TRANSFER_STATUS
  , CREATED_TIMESTAMP
  , MODIFIED_TIMESTAMP
)
select
    INVENTORY_BALANCE_ID_SEQ.nextval  ID                     
  , '360'                        REGION_CODE            
  , 'UTC2'                       WAREHOUSE_CODE         
  , 12345                        STOCK_ITEM_NUMBER      
  , 100                         ON_HAND_QUANTITY       
  , 5                           MORTGAGED_QUANTITY     
  , 0                           UNSALABLE_QUANTITY     
  , 5                           SAFE_QUANTITY          
  , 1                           STATUS                 
  , NULL                        PRE_TNA_STATUS         
  , NULL                        PRE_SALE_STATUS        
  , NULL                        UNTIL_DATE_TIME        
  , NULL                        POST_TNA_STATUS        
  , NULL                        POST_SALE_STATUS       
  , NULL                        TRANSFER_STATUS        
  , current_timestamp           CREATED_TIMESTAMP      
  , current_timestamp           MODIFIED_TIMESTAMP     
from dual;





INSERT INTO INVENTORY_BALANCE
(
    ID
  , REGION_CODE
  , WAREHOUSE_CODE
  , STOCK_ITEM_NUMBER
  , ON_HAND_QUANTITY
  , MORTGAGED_QUANTITY
  , UNSALABLE_QUANTITY
  , SAFE_QUANTITY
  , STATUS_
  , PRE_TNA_STATUS
  , PRE_SALE_STATUS
  , UNTIL_DATE_TIME
  , POST_TNA_STATUS
  , POST_SALE_STATUS
  , TRANSFER_STATUS
  , CREATED_TIMESTAMP
  , MODIFIED_TIMESTAMP
)
select
    0                           ID                     
  , '360'                        REGION_CODE            
  , 'UTC1'                       WAREHOUSE_CODE         
  , 23456                        STOCK_ITEM_NUMBER      
  , 100                         ON_HAND_QUANTITY       
  , 5                           MORTGAGED_QUANTITY     
  , 0                           UNSALABLE_QUANTITY     
  , 5                           SAFE_QUANTITY          
  , 1                           STATUS                 
  , NULL                        PRE_TNA_STATUS         
  , NULL                        PRE_SALE_STATUS        
  , NULL                        UNTIL_DATE_TIME        
  , NULL                        POST_TNA_STATUS        
  , NULL                        POST_SALE_STATUS       
  , NULL                        TRANSFER_STATUS        
  , current_timestamp           CREATED_TIMESTAMP      
  , current_timestamp           MODIFIED_TIMESTAMP     
from dual;




INSERT INTO INVENTORY_TRANSACTION
(
    ID
  , REGION_CODE
  , WAREHOUSE_CODE
  , STOCK_ITEM_NUMBER
  , REF_SOURCE
  , REF_ID
  , REF_ORDER_ID
  , REF_UID
  , TRANSACTION_DATE
  , TRANSACTION_CODE
  , ON_HAND_QUANTITY
  , MORTGAGED_QUANTITY
  , UNSALABLE_QUANTITY
  , STATUS_
  , TRANSFER_STATUS
  , CREATED_TIMESTAMP
  , MODIFIED_TIMESTAMP
)
select 
    INVENTORY_TRANSACTION_ID_SEQ.nextval   ID                   
  , 360                      REGION_CODE          
  , 'UTC1'                   WAREHOUSE_CODE       
  , 12345                    STOCK_ITEM_NUMBER    
  , NULL                     REF_SOURCE           
  , NULL                     REF_ID               
  , NULL                     REF_ORDER_ID         
  , NULL                     REF_UID              
  , 20110101230101           TRANSACTION_DATE     
  , 'M'                      TRANSACTION_CODE     
  , 0                        ON_HAND_QUANTITY     
  , 5                        MORTGAGED_QUANTITY   
  , NULL                     UNSALABLE_QUANTITY   
  , 1                        STATUS_              
  , NULL                     TRANSFER_STATUS      
  , current_timestamp        CREATED_TIMESTAMP    
  , current_timestamp        MODIFIED_TIMESTAMP   
from dual ;



INSERT INTO INVENTORY_TRANSACTION
(
    ID
  , REGION_CODE
  , WAREHOUSE_CODE
  , STOCK_ITEM_NUMBER
  , REF_SOURCE
  , REF_ID
  , REF_ORDER_ID
  , REF_UID
  , TRANSACTION_DATE
  , TRANSACTION_CODE
  , ON_HAND_QUANTITY
  , MORTGAGED_QUANTITY
  , UNSALABLE_QUANTITY
  , STATUS_
  , TRANSFER_STATUS
  , CREATED_TIMESTAMP
  , MODIFIED_TIMESTAMP
)
select 
    INVENTORY_TRANSACTION_ID_SEQ.nextval   ID                   
  , 360                      REGION_CODE          
  , 'UTC1'                   WAREHOUSE_CODE       
  , 12345                    STOCK_ITEM_NUMBER    
  , NULL                     REF_SOURCE           
  , NULL                     REF_ID               
  , NULL                     REF_ORDER_ID         
  , NULL                     REF_UID              
  , 20110101230101           TRANSACTION_DATE     
  , 'S'                      TRANSACTION_CODE     
  , -5                       ON_HAND_QUANTITY     
  , -5                       MORTGAGED_QUANTITY   
  , NULL                     UNSALABLE_QUANTITY   
  , 1                        STATUS_              
  , NULL                     TRANSFER_STATUS      
  , current_timestamp        CREATED_TIMESTAMP    
  , current_timestamp        MODIFIED_TIMESTAMP   
from dual ;




INSERT INTO INVENTORY_TRANSACTION
(
    ID
  , REGION_CODE
  , WAREHOUSE_CODE
  , STOCK_ITEM_NUMBER
  , REF_SOURCE
  , REF_ID
  , REF_ORDER_ID
  , REF_UID
  , TRANSACTION_DATE
  , TRANSACTION_CODE
  , ON_HAND_QUANTITY
  , MORTGAGED_QUANTITY
  , UNSALABLE_QUANTITY
  , STATUS_
  , TRANSFER_STATUS
  , CREATED_TIMESTAMP
  , MODIFIED_TIMESTAMP
)
select 
    INVENTORY_TRANSACTION_ID_SEQ.nextval   ID                   
  , 360                      REGION_CODE          
  , 'UTC1'                   WAREHOUSE_CODE       
  , 12345                    STOCK_ITEM_NUMBER    
  , NULL                     REF_SOURCE           
  , NULL                     REF_ID               
  , NULL                     REF_ORDER_ID         
  , NULL                     REF_UID              
  , 20110101230101           TRANSACTION_DATE     
  , 'M'                      TRANSACTION_CODE     
  , 0                        ON_HAND_QUANTITY     
  , 2                        MORTGAGED_QUANTITY   
  , NULL                     UNSALABLE_QUANTITY   
  , 1                        STATUS_              
  , NULL                     TRANSFER_STATUS      
  , current_timestamp        CREATED_TIMESTAMP    
  , current_timestamp        MODIFIED_TIMESTAMP   
from dual ;



INSERT INTO INVENTORY_TRANSACTION
(
    ID
  , REGION_CODE
  , WAREHOUSE_CODE
  , STOCK_ITEM_NUMBER
  , REF_SOURCE
  , REF_ID
  , REF_ORDER_ID
  , REF_UID
  , TRANSACTION_DATE
  , TRANSACTION_CODE
  , ON_HAND_QUANTITY
  , MORTGAGED_QUANTITY
  , UNSALABLE_QUANTITY
  , STATUS_
  , TRANSFER_STATUS
  , CREATED_TIMESTAMP
  , MODIFIED_TIMESTAMP
)
select 
    INVENTORY_TRANSACTION_ID_SEQ.nextval   ID                   
  , 360                      REGION_CODE          
  , 'UTC2'                   WAREHOUSE_CODE       
  , 12345                    STOCK_ITEM_NUMBER    
  , NULL                     REF_SOURCE           
  , NULL                     REF_ID               
  , NULL                     REF_ORDER_ID         
  , NULL                     REF_UID              
  , 20110101230101           TRANSACTION_DATE     
  , 'M'                      TRANSACTION_CODE     
  , 0                        ON_HAND_QUANTITY     
  , 2                        MORTGAGED_QUANTITY   
  , NULL                     UNSALABLE_QUANTITY   
  , 1                        STATUS_              
  , NULL                     TRANSFER_STATUS      
  , current_timestamp        CREATED_TIMESTAMP    
  , current_timestamp        MODIFIED_TIMESTAMP   
from dual ;



INSERT INTO INVENTORY_TRANSACTION
(
    ID
  , REGION_CODE
  , WAREHOUSE_CODE
  , STOCK_ITEM_NUMBER
  , REF_SOURCE
  , REF_ID
  , REF_ORDER_ID
  , REF_UID
  , TRANSACTION_DATE
  , TRANSACTION_CODE
  , ON_HAND_QUANTITY
  , MORTGAGED_QUANTITY
  , UNSALABLE_QUANTITY
  , STATUS_
  , TRANSFER_STATUS
  , CREATED_TIMESTAMP
  , MODIFIED_TIMESTAMP
)
select 
    INVENTORY_TRANSACTION_ID_SEQ.nextval   ID                   
  , 360                      REGION_CODE          
  , 'UTC1'                   WAREHOUSE_CODE       
  , 23456                    STOCK_ITEM_NUMBER    
  , NULL                     REF_SOURCE           
  , NULL                     REF_ID               
  , NULL                     REF_ORDER_ID         
  , NULL                     REF_UID              
  , 20110101230101           TRANSACTION_DATE     
  , 'M'                      TRANSACTION_CODE     
  , 0                        ON_HAND_QUANTITY     
  , 2                        MORTGAGED_QUANTITY   
  , NULL                     UNSALABLE_QUANTITY   
  , 1                        STATUS_              
  , NULL                     TRANSFER_STATUS      
  , current_timestamp        CREATED_TIMESTAMP    
  , current_timestamp        MODIFIED_TIMESTAMP   
from dual ;
